package com.eboss2.sbs.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.TextView;

import com.eboss2.sbs.R;
import com.eboss2.sbs.activity.base.BaseActivity;
import com.eboss2.sbs.adapter.SkNoAdapter;
import com.mytools.tool.activityManager.MyActivityManager;
import com.tool.utils.view.MyListView;


import java.util.ArrayList;
import java.util.List;

public class ActivityAppReceiverFunction extends BaseActivity implements View.OnClickListener {

	private final String TAG = "ActivityAppReceiverFunction";

	private List<String> datas = new ArrayList<String>();// 信息通知
	private SkNoAdapter adapter;
	private MyListView myListView;
	private TextView tv_function_destail;
	private TextView tv_mcht_no;
	private TextView tv_no_detail;




	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		mContext = this;
		setContentView(R.layout.activity_my_no);
		MyActivityManager.getInstance().addActivity(this);


		initView();


	}

	private void initView() {



		int type = getIntent().getIntExtra("type", 0);
		if (type == 1){
			showView(R.id.titleback_btn_back, true);
			setTvText(R.id.tv_title, "扫码付商户终端号");
			showView(R.id.next_sure, false);
			findViewById(R.id.titleback_btn_back).setOnClickListener(this);

			tv_function_destail = textView(R.id.tv_function_destail);
			tv_function_destail.setText("扫码付商户号");
			tv_mcht_no = textView(R.id.tv_mcht_no);
			tv_no_detail = textView(R.id.tv_no_detail);
			tv_no_detail.setText("分配的商户终端号");


		}else{
			showView(R.id.titleback_btn_back, true);
			setTvText(R.id.tv_title, "台卡编号");
			showView(R.id.next_sure, false);
			findViewById(R.id.titleback_btn_back).setOnClickListener(this);
			tv_function_destail = textView(R.id.tv_function_destail);
			tv_function_destail.setText("台卡商户号");
			tv_mcht_no = textView(R.id.tv_mcht_no);
			tv_no_detail = textView(R.id.tv_no_detail);
			tv_no_detail.setText("分配的台卡编号");

		}



		myListView =  findViewById(R.id.listview);
		adapter = new SkNoAdapter(mContext, datas);
		myListView.setAdapter(adapter);
		myListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
			@Override
			public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {

			}
		});

	}













	@Override
	protected void onResume() {
		super.onResume();
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
	}


	@Override
	public void onClick(View v) {
		switch (v.getId()) {
			case R.id.titleback_btn_back:
				finish();
				break;

			default:break;
		}
	}
}
